package com.gao.security.verificationcode.base;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 */
@Data
public class BaseCode implements VerficationCode {
    /**
     * 验证码
     */
    private String code;
    /**
     * 过期时间(单位：ms)
     */
    private Long expireTime;

    /**
     * 唯一键
     */
    private String uuid;

    public BaseCode(String code, String uuid,int expireIn){
        this.code = code;
        this.expireTime = System.currentTimeMillis()+expireIn*1000;
        this.uuid=uuid;
    }


    public static void main(String[] args) {
        boolean b = StringUtils.equalsAny("1", "2", "1");
        System.out.println(b);
    }
}
